Skip to main content

Update API Webhook

Used to update API tool webhook configuration. This allows you to modify webhook settings including the endpoint URL, enabled status, events, headers, authentication secrets, and retry behavior.

API Endpoint

PropertyValue
Request MethodPOST
Request URLhttps://api.seliseblocks.com/tools/api-webhook/{tool_id}

Request

Request Example

curl -X POST 'https://api.seliseblocks.com/tools/api-webhook/{tool_id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"Enabled": true,
"URL": "https://your-webhook-endpoint.com/webhook",
"Events": ["tool.executed"],
"Headers": {
"Authorization": "Bearer your-token",
"X-Custom-Header": "custom-value"
},
"Secret": "your-secret-key",
"RetryAttempts": 3,
"TimeoutSeconds": 10
}'

Path Parameters

FieldTypeRequiredDescription
tool_idstringYesThe unique identifier of the API tool.

Request Headers

FieldTypeRequiredDescription
acceptstringYesAccepted response format. Use application/json
Content-Typeapplication/jsonYesData type, must be application/json.

Request Body

Request Body Schema

{
"Enabled": false,
"URL": "string",
"Events": [
"tool.executed"
],
"Headers": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Secret": "string",
"RetryAttempts": 3,
"TimeoutSeconds": 10
}

Request Body Parameters

FieldTypeRequiredDescription
EnabledbooleanNoWhether the webhook is enabled or disabled.
URLstringNoThe webhook endpoint URL where events will be sent.
EventsarrayNoList of events that trigger the webhook (e.g., "tool.executed").
HeadersobjectNoCustom HTTP headers to include in webhook requests.
SecretstringNoSecret key for webhook authentication/verification.
RetryAttemptsintegerNoNumber of retry attempts for failed webhook calls (default: 3).
TimeoutSecondsintegerNoTimeout duration in seconds for webhook requests (default: 10).
note

Webhook Configuration Notes

  • Events: Currently supports "tool.executed" event type
  • Headers: Use custom headers for authentication or additional metadata
  • Secret: Used to sign webhook payloads for verification on your endpoint
  • RetryAttempts: Webhook will automatically retry on failure up to the specified number of times
  • TimeoutSeconds: Requests exceeding this duration will be cancelled
tip

After updating a webhook configuration, the system will:

  • Validate the webhook URL if provided
  • Apply the new settings immediately
  • Use the updated configuration for all subsequent events
  • Retry failed webhook deliveries according to the new retry settings

Response

Success Response (200 OK)

Returns an object containing the update status.

{
"is_success": true,
"item_id": "tool_12345",
"detail": "Webhook configuration updated successfully",
"error": {}
}

Response Fields

FieldTypeDescription
is_successbooleanIndicates whether the update was successful.
item_idstringThe identifier of the updated webhook configuration.
detailstringSuccess or failure message with additional context.
errorobjectError details if the operation failed (empty if successful).

Error Response (422 Unprocessable Entity)

Returns validation error details when the request body is invalid.

{
"detail": [
{
"loc": [
"body",
"URL"
],
"msg": "invalid URL format",
"type": "value_error.url"
}
]
}

Error Response Fields

FieldTypeDescription
detailarrayArray of validation error objects.
locarrayLocation of the error in the request (e.g., body field).
msgstringHuman-readable error message.
typestringError type identifier.

Error Codes

Status CodeDescriptionResponse Type
200Successful ResponseSuccess
400Bad Request - Invalid webhook configurationBad Request
404Not Found - API tool does not existNot Found
422Validation Error - Invalid request parametersUnprocessable Entity